package com.mccrea.pattern.factory.absfactory.pizzastore.order;


import com.mccrea.pattern.factory.absfactory.pizzastore.pizza.BJCheesePizza;
import com.mccrea.pattern.factory.absfactory.pizzastore.pizza.BJGreekPizza;
import com.mccrea.pattern.factory.absfactory.pizzastore.pizza.Pizza;

/**
 * @Classname BJFactory
 * @Description 北京工厂
 * @Date 2021/5/7 0007 19:19
 * @Created by Mccrea_Gao
 */
public class BJFactory implements IFactory {
    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if ("cheese".equals(orderType)) {
            pizza = new BJCheesePizza();
        } else if ("greek".equals(orderType)) {
            pizza = new BJGreekPizza();
        }
        return pizza;
    }
}
